package com.merry.test.controller;

import com.merry.test.bean.User;
import org.springframework.web.bind.annotation.*;

@RestController
public class HelloController {

    @PostMapping("/user")
    public User getUser(@RequestBody User user){
        System.out.println(user.getName());
        return user;
    }

    @PostMapping("/name")
    public String getUser1(@RequestBody String name){
        System.out.println(name);
        return name;
    }
}
